import time

def show_progress(total_percentage, bar_length=20, interval=0.1):
    print("------执行开始------")
    for i in range(total_percentage + 1):
        progress = i * bar_length // total_percentage
        progress_bar = "[" + "#" * progress + " " * (bar_length - progress) + "]"
        print("\r{:3}% {}".format(i, progress_bar), end="")
        time.sleep(interval)
    print("\n------执行结束------")

total_percentage = 100
bar_length = 20
interval = 0.1
show_progress(total_percentage, bar_length, interval)
